package org.afs.gescol.gwt.client.view;

import org.afs.gescol.gwt.client.factory.AppClientFactory;
import org.afs.gescol.gwt.client.presenter.ConfigurationsPresenter.ConfigurationsView;

import com.github.gwtbootstrap.client.ui.Button;
import com.google.gwt.event.dom.client.HasClickHandlers;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.Widget;

/**
 * Configuration view implementation.
 * @autor Kobla GBENYO (kobla.gbenyo@gmail.com)
 */
public class ConfigurationsViewImpl extends Composite implements ConfigurationsView {

    private ConfigurationsViewBinder binder = AppClientFactory.getConfigurationsViewBinder();

    /** The call service's button. */
    @UiField
    Button btnCallService;

    /**
     * An interface required by the UiBinder.
     */
    public interface ConfigurationsViewBinder extends UiBinder<Widget, ConfigurationsViewImpl> {
    }

    @Override
    public void init() {
        initWidget(binder.createAndBindUi(this));
        btnCallService.ensureDebugId("debugIdBtnCallService");
    }

    @Override
    public Widget asWidget() {
        return this;
    }

    @Override
    public HasClickHandlers getBtnCallService() {
        return btnCallService;
    }

    @Override
    public Widget getPrincipalContainer() {
        return getWidget();
    }

}
